@font-face {
  font-family: 'Inconsolata';
  font-style: normal;
  font-weight: 400;
  src: local('Inconsolata'), url(font/inconsolata.woff) format('woff');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  src: local('Open Sans'), local('OpenSans'), url(font/open_sans.woff) format('woff');
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 600;
  src: local('Open Sans Semibold'), local('OpenSans-Semibold'), url(font/open_sans_semibold.woff) format('woff');
}
//@import url(http://fonts.googleapis.com/css?family=Inconsolata);
//@import url(http://fonts.googleapis.com/css?family=Open+Sans:600,400);

@font-face {
  font-family: "migu1m";
  src: url(font/migu-1m-regular.woff) format('woff');
}


@import './lib/fa/scss/font-awesome.scss';

////////////////////////////////////////////////////////////////////////
@mixin cf {
  zoom: 1;

  &:before,
  &:after {
    display: block;
    height: 0;
    visibility: hidden;
    content: "\0020";
  }

  &:after {
    clear: both;
  }
}
.cf{ @include cf; }

@mixin pa00 {
  position: absolute;
  top: 0;
  left: 0;
}

@mixin box{
  @include pa00;
  width: 100%;
  margin: 0;
}

@mixin bg_gray{
    background-color: #313437;
}

@mixin bg_darkgray{
  background-color: #181818;
}

////////////////////////////////////////////////////////////////////////
.float_left{ float: left;}
.float_right{ float: right; }

h2{
  text-align: center;
  color: #FFF;
  font-size: 26px;
  font-weight: normal;
  letter-spacing: 10px;
}

img{
  border: none;
}

a{
  color: #999;
  text-decoration: none;
  transition:color .5s;
}
a:hover{
  color: #fff8a9;
}
////////////////////////////////////////////////////////////////////////

html, body{ height: 100%; }

body{
  margin: 0;
  padding: 0;
  position: relative;
  font-family: 'Inconsolata', 'migu1m', sans-serif
}


#home{
  @include box;
  position: fixed;
  padding: 0;
  height: 100%;
  @include cf;
  z-index: 20;

  $side_width: 200px;

  .side{
    @include pa00;
    font-family: 'Open Sans', sans-serif;
    background-color: #313437;
    width: $side_width;
    margin: 0;
    height: 100%;

    dl{
      line-height: 2;
      cursor: default;
      margin-top: 0;

      dt{
        font-weight: bold;
        font-size: 12px;
        color: #859597;
        margin-top: 10px;
        padding-left: 10px;
      }

      dd{
        font-size: 11px;
        $color: #DADADA;
        color: $color;
        margin: 0px;
        padding-left: 25px;

        &.file{
          padding-left: 43px;
        }
        &.current{
          background-color: #2095F0;
          color: #FFF;
        }

        i{
          margin-right: 7px;
          color: #3173C7;
          &.fa-file{
            color: #313437;
          }
        }

        a:link, a:visited, a:hover, a:active{
          color: $color;
          text-decoration: none;
        }
        a:hover{
          color: #FFFFFF;
        }
      }
    }

  }

  .main{
    @include pa00;
    left: $side_width;
    width: 100%;
    height: 100%;
    overflow: hidden;

    .tabs{
      $color: #4B4F53;
      $bgcolor: #131416;
      $radius: 7px;

      width: 100%;
      background: $bgcolor;
      padding: 0 $radius + 2px;
      border-bottom: 6px $color solid;

      .tab{
        font-family: 'Open Sans', sans-serif;
        font-size: 11px;
        color: #FFF;
        width: 140px;
        padding: 7px 9px;
        background-color: $color;
        position: relative;
        border-top-left-radius: $radius;
        border-top-right-radius: $radius;

        &:before, &:after {
          position: absolute;
          bottom: -1px;
          width: $radius;
          height: $radius;
          content: " ";
          background-color: $bgcolor;
        }
        &:before {
          left: -$radius;
          border-bottom-right-radius: $radius;
          border-width: 0 1px 1px 0;
          border-color: $color;
          border-style: solid;
          box-shadow: 2px 4px 0 $color;
        }
        &:after {
          right: -$radius;
          border-bottom-left-radius: $radius;
          border-width: 0 0 1px 1px;
          border-color: $color;
          border-style: solid;
          box-shadow: -2px 4px 0 $color;
        }

        .fa-stack{
          position: absolute;
          right: 3px;
          top: 10px;
          line-height: 1;

          .fa-stack-2x{
            font-size: 12px;
            color: #818487;
          }
          &:hover .fa-stack-2x{ color: #E0E0E0;}

          .fa-stack-1x{
            font-size: 10px;
            color: $color;
            margin-top: 1px;
          }
        }
      }
    }

    .body{
      $tabs_height: 40px;
      $lines_width: 45px;
      height: 100%;

      font-size: 20px !important;
      line-height: 1.2 !important;
      background-color: #26292C;
      padding-left: $lines_width + 15px;
      padding-top: 4px;

      .lines{
        @include pa00;
        top: $tabs_height;
        width: $lines_width;
        color: #3D4D50;
        text-align: right;
        height: 100%;
        overflow: hidden;
      }

      pre{
        margin: 0;
        padding: 0;
        code{
          margin: 0;
          padding: 0;
          color: #EEE;
          font-family: 'Inconsolata', sans-serif;
          font-size: 20px;
          line-height: 1.2;
          background: transparent;
          #cursor{
            margin: 0 10px 0 0;
            border-right: 1px white solid;
          }
        }
      }
    }
    #scroll_attention{
      position: fixed;
      right: 20px;
      bottom: 30px;
      text-align: center;
      color: #3C3F42;
      .down_arrow{
        position: relative;
        width: 0;
        height: 0;
        border: 16px solid transparent;
        border-top-color: #3C3F42;
        margin-top: 30px;
        &:after{
          position: absolute;
          content: '';
          top: -32px;
          left: -8px;
          width: 16px;
          height: 16px;
          background: #3C3F42;
        }
      }
    }
  }
}

@-webkit-keyframes blink {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
#cursor{
  -webkit-animation-name: blink;
  -webkit-animation-duration: 0.7s;
  -webkit-animation-iteration-count:infinite;
  -webkit-animation-timing-function:ease-in-out;
  -webkit-animation-direction: alternate;
  -webkit-animation-delay: 0s;
}


#global_navi{
  $height: 76px;
  height: $height;
  position: absolute;
  bottom: -$height + 23px;
  left: 0;
  width: 100%;
  background-color: #3C3F42;
  overflow: hidden;
  -webkit-box-shadow: 0px 5px 5px 0 rgba(0, 0, 0, 0.15);
          box-shadow: 0px 5px 5px 0 rgba(0, 0, 0, 0.15);

  .editor_foot{
    font-family: 'Open Sans', sans-serif;
    color: #949597;
    font-size: 11px;
    margin: 3px 15px;
    @include cf;

    .charset {
      margin-right: 12px;
    }
  }

  .navi_menu{
    padding-top: 1.1em;

    .logo{
      float: left;
      margin-left: 40px;
      letter-spacing: 5px;
      font-size: 1.2em;
      a:link, a:visited, a:hover, a:active{
        color: #FFF;
        text-decoration: none;
        img{
          float: left;
          margin: -2px 15px 0 0;
        }
        span{
          display: block;
          float: left;
        }
      }
    }

    ul{
      margin-top: 0;
      float: right;
      @include cf;
      li{
        float: left;
        list-style: none;
        margin-right: 40px;
        letter-spacing: 5px;

        a:link, a:visited, a:hover, a:active{
          color: #FFF;
          text-decoration: none;
        }
      }
    }

    #navi_marker{
      display: block;
      position: absolute;
      width: 90px;
      height: 5px;
      background-color: #CCC;
      right:385px;
      bottom:-5px;
    }
  }
}

#about{
  @include bg_gray;
  position: fixed;
  top: 100%;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;

  h2{
    margin-top: 3.2em;
  }

  .wrap{
    width: 80%;
    height:50%;
    margin: 5% auto 20%;
    overflow: hidden;
    @include cf;

    .image{
      $size: 100%;
      width: 50%;
      height: $size;
      float: left;
      text-align: center;

      img{
        height: $size;
        background-color: #fff;
        -webkit-border-radius: $size;
                border-radius: $size;
      }
    }

    .textbox{
      width: 50%;
      height: 100%;
      float: left;
      position: relative;
      overflow: hidden;

      .text{
        @include pa00;
        $pd: 5%;
        width: 100% - $pd * 2;
        height: 90%;
        padding: 0 $pd;
        font-size: 14px;
        color: #FFF;
        letter-spacing: 3px;
        opacity: 1;
        overflow: hidden;

        h3{
          font-weight: normal;
          font-size: 16px;
          text-align: center;
          padding-bottom: 15px;
          width: 50%;
          border-bottom: 1px solid #949597;
          margin: 0 auto 30px;
        }

        p{
          line-height: 1.8;

        }
      }

      .marker_area{
        $width: 120px;

        @include cf;
        width: $width;
        position: absolute;
        bottom: 2px;
        left: 50%;
        margin-left: -($width/2);


        .marker_wrap{
          position: relative;
          width: $width;
          margin: 0 auto;
          padding-top: 2px;

          .marker{
            $markersize: 6px;
            display: block;
            width: $markersize;
            height: $markersize;
            -webkit-border-radius: $markersize;
                    border-radius: $markersize;
            background-color: #EEEEEE;
            border: 2px solid #313437;
            margin: 2px;
            float: left;
            margin: 0 15px;

            &.left { left:0; }
            &.right{ right:0;}
          }
        }

        .pointer{
          @include pa00;
          $pointersize: 14px;
          display: block;
          width: $pointersize;
          height: $pointersize;
          -webkit-border-radius: $pointersize;
                  border-radius: $pointersize;
          background-color: #888888;
        }
      }
    }
  }

  #skills{
    @include bg_gray;
    $height: 140px;
    position: absolute;
    left: 0;
    bottom: -$height;
    width: 100%;
    height: $height;
  }
}

#skills_body{
  @include bg_darkgray;
  position: fixed;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  margin: 0 auto;

  .graphs{
    @include cf;
    position: absolute;
    top: 20%;
    width: 20%;
    height: 100%;
    margin: 0;
    padding: 0 !important;

    li{
      width: 33%;
      height:100%;
      float: left;
      color: #FFF;
      list-style-type: none;
      text-align: center;

      .graph{
        width: 16%;
        height: 300px;
        border: 1px #313437 solid;
        margin: 60px auto 20px;
        overflow: hidden;
        .graph_inner{
          @include bg_gray;
          width: 100%;
          height: 100%;
        }
      }
      .title{
        height: 1.8em;
      }
      .image{
        img{
          width:35%;
         }
      }
    }
  }
}

#works{
  @include bg_gray;
  position: fixed;
  top: 76px;
  right: 100%;
  width: 100%;
  height: 100%;
  padding-top: 60px;
  z-index: 10;
  ul.flips{
    width:728px;
    margin: 0 auto;
    padding:0;
    $width: 314px;
    $height: 189px;
    li{
      width: $width;
      height:$height;
      margin: 40px 20px 0px;
      list-style-type: none;
      display: inline-block;
      float:left;
      .flip {
        width: $width - 2px;
        height: $height - 2px;
        border: 2px solid white;
        display: block;
        -webkit-transform-style: preserve-3d;
        -webkit-transition: 0.5s;
        img, div {
          width: $width - 2px;
          height: $height - 2px;
          position: absolute;
          -webkit-backface-visibility: hidden;
          background: transparent;
          text-align: center;
          color: white;
          .fa{
            font-size: 6em;
            margin: 8% auto 6%;
            display: block;
          }
          &.on {
            -webkit-transform: rotateY(180deg);
            background: #fff ;
          }
          &.off { z-index: 10;}
        }
        &:hover .off { z-index: 0;}
      }
      &:hover .flip {
        -webkit-transform: rotateY(180deg);
      }
    }
  }
}

#contact{
  @include bg_gray;
  position: fixed;
  top: 100%;
  left: 0px;
  width: 100%;
  height: 100%;
  padding-top: 60px;
  z-index: 10;
  #links{
    width: 750px;
    margin: 12% auto;
    padding: 0;
    li{
      list-style-type: none;
      float: left;
      width: 100px;
      height: 100px;
      margin: 0 25px;
      a{
        -webkit-transition: 0.3s;
        &:hover{
          -webkit-transition: 0.3s;
          opacity: 0.2;
        }
      }
      img{
        width: 100%;
        height: 100%;
      }
    }
  }
}

#copyright{
  color: #FFFFFF;
  text-align: center;
  opacity:0.8;
}

#bg1{
  position: fixed;
  top: 50%;
  background: #CCCCCC url(../img/bg1.jpg) no-repeat left top;
  width: 100%;
  height: 1000px;
  z-index: 0;
}

#bg2{
  position: fixed;
  top: 0%;
  background: #CCCCCC url(../img/bg2.jpg) no-repeat left top;
  width: 100%;
  height: 200%;
  z-index: -1;
}

.white_text{
  position: fixed;
  color: #FFF;
  text-align: center;
  font-size: 40px;
  width: 100%;
  z-index: 5;
  letter-spacing: 10px;
}

#share{
  width: 100px + 130px + 140px + 80px;
  padding: 0;
  margin: 30px auto;
  li{
    list-style-type: none;
    float: left;

    &.twitter { width: 100px; }
    &.facebook { width: 130px; }
    &.hatena { width: 140px; }
    &.github { width: 80px; }
  }
}
